package com.jinlia.show.modules.system.config;

import com.jinlia.show.modules.system.utils.MysqlDbUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

/**
 * 为工具类注入spring对象
 */
@Component
public class SysCommandBeanConfig implements CommandLineRunner {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Value("${file.uri}")
    String fileUrl;

    @Override
    public void run(String... args) {
        MysqlDbUtils.newInstance(jdbcTemplate);
    }
}
